Erdos-Renyi random graphs and Mathematica 
(by Artem Novozhilov, Math 767: Mathematics of Networks)

The simplest command to play around random graphs is RandomGraph[BernoulliGraphDistribution[n,p]] which is exactly our G(n,p).

To evaluate Mathematica commant, you need to use Shift+Enter.

G[n_,p_]:=RandomGraph[BernoulliGraphDistribution[n,p]];

G[20,0.2]

G[20,0.4]

G[20,1] (*This is (Subscript[K, 20])*)

Let us see the dergee distribution of of a random graph:

(*The parameters*)
n=30000;
p=0.001;
(*Collect the date*)
data=VertexDegree @ G[n,p];
(*Plot the data*)
o=Histogram[data,Automatic,"PDF"]

(*Consider the theoretical distribution*)
t=DiscretePlot[PDF[PoissonDistribution[n p],m],{m,0,60},Joined-> True]

(*Now compare them*)
Show[o,t,AxesOrigin->{0,0},PlotRange->All]

Now here is an example of Random Graph Process.

(*Parameters*)
n=200;
pMax=0.03; (*The probability of an edge will be changing from 0 to pMax*)
pFig=0.01; (*This is value of p for which I plot the random graph and store the coordinates of the vertices. This should be 0<pFig≤pMax*)
NN=Binomial[n,2]; (*Number of edges in (Subscript[K, n])*)
m=RandomReal[{0,1},NN];
edges=Flatten[Table[{i\[UndirectedEdge]j},{i,1,n-1},{j,i+1,n}]];
pos=Flatten[Position[m,x_/;x<pFig]];
myCoord=VertexCoordinates/.AbsoluteOptions[Graph[Table[i,{i,1,n}],edges[[pos]]],VertexCoordinates];

(*First manipulation is for fixed vertex coordinates*)

Manipulate[Graph[Table[i,{i,1,n}],
edges[[Flatten[Position[m,x_/;x<p]]]],VertexCoordinates->myCoord
],{p,0,pMax}]

(*This manipulation is for the same random graph process, but each graph is plotted by Mathematica*)

Manipulate[Graph[Table[i,{i,1,n}],
edges[[Flatten[Position[m,x_/;x<p]]]],
AspectRatio->1],{p,0,pMax}]

?PDF

DiscretePlot[PDF[PoissonDistribution[0.4 6],m],{m,0,15},Joined-> True]

Histogram[data,Automatic,"PDF"]

data

?VertexDegree